<?php

class DbQuery {

    private $result;

    public static function create() {
        return new DbQuery();
    }

    private function __construct() {
    }

    public function query($statement) {
        $q = DBLink::getInstance()->query($statement);
        $this->result=Array();
        $i = 0;
        while(($row = $q->fetch(PDO::FETCH_ASSOC)) && ($i < 200))
        {
            array_push($this->result, $row);
            $i++;
        }
        return $this->result;
    }

}
?>
